/*
 * 
 * 
 * 
 */
package com.hboxs.asl.service.impl;

import com.hboxs.asl.Page;
import com.hboxs.asl.Pageable;
import com.hboxs.asl.dao.CourseDao;
import com.hboxs.asl.entity.Category;
import com.hboxs.asl.entity.Course;
import com.hboxs.asl.entity.Member;
import com.hboxs.asl.service.CourseService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * Service - 课程
 */
@Service("courseServiceImpl")
public class CourseServiceImpl extends BaseServiceImpl<Course, Long> implements CourseService {

    @Resource(name = "courseDaoImpl")
    private CourseDao courseDao;

    @Resource(name = "courseDaoImpl")
    public void setBaseDao(CourseDao courseDao) {
        super.setBaseDao(courseDao);
    }


    @Override
    public Page<Course> findPageGroup(Course.Type type, Pageable pageable) {
        return courseDao.findPageGroup(type, pageable);
    }

    @Override
    public Page<Course> findTrailerPage(Pageable pageable, Member teacher) {
        return courseDao.findTrailerPage(pageable, teacher);
    }

    @Override
    public Page<Course> findCoursePage(Pageable pageable,Category category) {
        return courseDao.findCoursePage(pageable, category);
    }

    @Override
    public Page<Course> findVedioPage(Pageable pageable, Member teacher, Course.CourseType courseType, Category category) {
        return courseDao.findVedioPage(pageable, teacher, courseType, category);
    }

    @Override
    public Page<Course> findVedioPageByCategoryId(Pageable pageable, Category category, Course.Type type) {
        return courseDao.findVedioPageByCategoryId(pageable, category, type);
    }

    @Override
    public Page<Course> findVedioPageByTeacherId(Pageable pageable, Member teacher, Course.Type type) {
        return courseDao.findVedioPageByTeacherId(pageable, teacher, type);
    }

    @Override
    public Page<Course> findVedioPageByTeacherId(Pageable pageable, Member teacher) {
        return courseDao.findVedioPageByTeacherId(pageable, teacher);
    }

    @Override
    public Page<Course> findLivePage(Pageable pageable, Course.CourseType courseType) {
        return courseDao.findLivePage(pageable, courseType);
    }

    @Override
    public Page<Course> findHotSearchPage(Pageable pageable, Boolean hotSearch) {
        return courseDao.findHotSearchPage(pageable, hotSearch);
    }
}
